#include "Utils.h"

std::string WStringToString(std::wstring & p_String)
{
	size_t origsize = wcslen(p_String.c_str()) + 1;
	const size_t newsize = p_String.size();
	size_t convertedChars = 0;
	char *nstring = new char[newsize];
	wcstombs_s(&convertedChars, nstring, origsize, p_String.c_str(), _TRUNCATE);
	std::string nnstring(nstring);
	delete [] nstring;
	return nnstring;
}